﻿ 
 
@using AmazeUI.db
@using Ema.Control
@using Microsoft.Win32
@model  Ema.Models.XtModel.SubXtRole

@{
    ViewBag.Title = "添加角色";
    var xtPowersJsons = ViewBag.Powers as IEnumerable<XtPowers>;
}

<div class="am-g">
    <div class="am-u-md-8 am-u-md-centered">
        <div class="am-panel" style="height: 1000px">
            <div class="am-panel-bd">
                @using (Html.BeginForm("Addrole", "Admin", FormMethod.Post, new { @class = "am-form-horizontal am-form" }))
                {

                    @Html.AmTestH(a => a.Name)
                    <div class="am-form-group">
                        <label class="am-u-sm-2 am-form-label am-padding-right">@Html.DisplayNameFor(a => a.powers)</label>
                        <div class="am-u-sm-6 ">
                            @if (xtPowersJsons != null)
                            {
                                foreach (var item in xtPowersJsons)
                                {
                                    <label class="am-checkbox-inline">
                                        <input type="checkbox" name="powers" value="@item.Details"> @item.Name
                                    </label>
                                }
                            }
                        </div>
                        <div class="am-hide-sm-only am-text-danger am-u-sm-4 ">
                            <span data-valmsg-replace="true" data-valmsg-for="Name" class="field-validation-valid"></span>
                        </div>
                    </div>


                    <input value="确定" type="submit" class="am-btn am-btn-primary" />
                }
            </div>
        </div>
    </div>
</div>

<div class="am-g"></div>